import classNames from 'classnames'
import styles from './index.module.scss'
type Props = {
  extra?: string
  onExtraClick?: () => void
  className?: string
}
export default function Input({ extra, onExtraClick, className, ...rest }:Props) {
  return (
    <div className={styles.root}>
      <input className={classNames('input', className)} {...rest} />
      {extra && (
        <div className="extra" onClick={onExtraClick}>
          {extra}
        </div>
      )}
    </div>
  )
}
